
<template>
  <van-row class="nav_bar">
    <van-nav-bar :title="title" left-arrow @click-left="onClickLeft" @click-right="onClickRight">
      <span slot="left" class="bar_text">
        <van-icon name="arrow-left" />返回
      </span>
      <span slot="right" class="bar_text">保存</span>
    </van-nav-bar>
  </van-row>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      default: ''
    }
  },
  data() {
    return {}
  },
  created() {},
  methods: {
    onClickLeft() {
      this.$emit('goback')
    },
    onClickRight() {
      this.$emit('confirm')
    }
  }
}
</script>

<style lang="less">
.nav_bar{
  .bar_text{
    color: #409EFF;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
</style>
